﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>html4+固定区域</title>
    <link href="demo.css" rel="stylesheet" type="text/css" />
    <link href="../css/uploader.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .fixed-view { position: fixed; top: 80px; left: 300px; width: 600px; height: 300px; padding: 20px; border: 1px solid red; }
    </style>
</head>

<body>
    <div id="header" class="header">Header</div>
    <div id="main" class="main">
        <div id="content" class="content">
            <div class="contentin">
                <div id="upload_main" class="fixed-view">
                    <div>
                        <a id="upload-target" class="x-button">选择文件并上传</a>
                    </div>
                    <div id="upload-view"></div>
                </div>
                <div class="h1000"></div>
            </div>
        </div>
        <div id="sidebar" class="sidebar"></div>
    </div>

    <script type="text/javascript" src="demo.js"></script>

    <script type="text/javascript" src="../js/Q.js"></script>
    <script type="text/javascript" src="../js/Q.Uploader.js"></script>
    <script type="text/javascript" src="../js/Q.Uploader.UI.File.js"></script>

    <script type="text/javascript">
        var uploader = new Q.Uploader({
            url: UPLOAD_URL + "?type=file",
            target: document.getElementById("upload-target"),
            view: document.getElementById("upload-view"),

            container: document.getElementById("upload_main"),
            getPos: function (target) {
                return { left: target.offsetLeft, top: target.offsetTop };
            },

            clickTrigger: false,
            html5: false
        });
    </script>
</body>
</html>